package m3d31;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

//序列化流
//把对象以流的方法写入文件
public class oObjectOutputStream {
    public static void main(String[] args) throws IOException {
        ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream("day02\\src\\m3d31\\m.txt"));
        //把对象写入文件
        oos.writeObject(new pPerson("aaa",1,2));

        //释放资源
        oos.close();

    }
}
